package S17.first;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Comparator;
import java.util.stream.Stream;

public class F02 {

	public static void main(String[] args) {
//		File file = new File("D:\\ROOT");
		Path path = Paths.get("D:\\ROOT");
	
		try (Stream<Path> walk = Files.walk(path)) {
			walk.sorted(Comparator.reverseOrder())
				.map(p->p.toFile())
				.forEach(f->f.delete());
		}catch(Exception e) {
			
		}
	}

}
